package com.wenlong.train_ticketing_system_springboot.querymodule.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.wenlong.train_ticketing_system_springboot.querymodule.pojo.User;
import com.wenlong.train_ticketing_system_springboot.querymodule.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/trainT")
@RestController
public class UserController {
    @Autowired
    UserService userService;
    @RequestMapping("/login")
    public String login(User user){
        System.out.println("======login=====");
        System.out.println(user.toString());
        return userService.login(user);
    }
    @RequestMapping("/register")
    public String register(User user ){
        System.out.println("=====register====");
        System.out.println(user.toString());
       return userService.register(user);
    }
}